// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 并离网控制详情 GET /v1/device-ctrls/grid-connection */
export async function deviceCtrlControllerImplGetGridCtrl(options?: { [key: string]: any }) {
  return request<API.ApiResultDeviceCtrl>(`${apiPrefix}/v1/device-ctrls/grid-connection`, {
    method: 'GET',
    ...(options || {}),
  });
}

/** 并离网控制执行 POST /v1/device-ctrls/grid-connection */
export async function deviceCtrlControllerImplExecuteGridCtrl(
  body: API.GridCtrlDTO,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/v1/device-ctrls/grid-connection`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 并离网控制进度 GET /v1/device-ctrls/grid-connection/progress */
export async function deviceCtrlControllerImplGetProgress(options?: { [key: string]: any }) {
  return request<API.ApiResultDeviceTask>(`${apiPrefix}/v1/device-ctrls/grid-connection/progress`, {
    method: 'GET',
    ...(options || {}),
  });
}
